﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.SessionState;

namespace YouYi.YingShengBack.Web.Models
{
    /// <summary>
    /// 管理员的上下文
    /// </summary>
    public class AdminContext
    {
        /// <summary>
        /// 会话的key
        /// </summary>
        private string SessionKey = "ADMIN_KEY";

        /// <summary>
        /// 静态的上下文
        /// </summary>
        public static AdminContext adminContext = new AdminContext();

        /// <summary>
        ///会话状态
        /// </summary>
        public HttpSessionState httpSessionState => HttpContext.Current.Session;

        /// <summary>
        /// 用户对象
        /// </summary>
        //public AdminUser adminInfo
        //{
        //    get
        //    {
        //        return httpSessionState[SessionKey] as AdminUser;
        //    }
        //    set
        //    {
        //        httpSessionState[SessionKey] = value;
        //    }
        //}
    }
}